﻿using System;
using System.Collections.Generic;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x0200005B RID: 91
	[HelpURL("https://www.youtube.com/watch?v=r5jiZnsDH3M")]
	//[AddComponentMenu("Scripts/RootMotion.FinalIK/Interaction System/Interaction System")]
	public class InteractionSystem : MonoBehaviour
	{
		// Token: 0x060003F5 RID: 1013 RVA: 0x0000490A File Offset: 0x00002B0A
		[ContextMenu("TUTORIAL VIDEO (PART 1: BASICS)")]
		public void OpenTutorial1()
		{
			Application.OpenURL("https://www.youtube.com/watch?v=r5jiZnsDH3M");
		}

		// Token: 0x060003F6 RID: 1014 RVA: 0x00004916 File Offset: 0x00002B16
		[ContextMenu("TUTORIAL VIDEO (PART 2: PICKING UP...)")]
		public void OpenTutorial2()
		{
			Application.OpenURL("https://www.youtube.com/watch?v=eP9-zycoHLk");
		}

		// Token: 0x060003F7 RID: 1015 RVA: 0x00004922 File Offset: 0x00002B22
		[ContextMenu("TUTORIAL VIDEO (PART 3: ANIMATION)")]
		public void OpenTutorial3()
		{
			Application.OpenURL("https://www.youtube.com/watch?v=sQfB2RcT1T4&index=14&list=PLVxSIA1OaTOu8Nos3CalXbJ2DrKnntMv6");
		}

		// Token: 0x060003F8 RID: 1016 RVA: 0x0000492E File Offset: 0x00002B2E
		[ContextMenu("TUTORIAL VIDEO (PART 4: TRIGGERS)")]
		public void OpenTutorial4()
		{
			Application.OpenURL("https://www.youtube.com/watch?v=-TDZpNjt2mk&index=15&list=PLVxSIA1OaTOu8Nos3CalXbJ2DrKnntMv6");
		}

		// Token: 0x060003F9 RID: 1017 RVA: 0x00002E24 File Offset: 0x00001024
		[ContextMenu("Support Group")]
		public void SupportGroup()
		{
			Application.OpenURL("https://groups.google.com/forum/#!forum/final-ik");
		}

		// Token: 0x060003FA RID: 1018 RVA: 0x00002E30 File Offset: 0x00001030
		[ContextMenu("Asset Store Thread")]
		public void ASThread()
		{
			Application.OpenURL("http://forum.unity3d.com/threads/final-ik-full-body-ik-aim-look-at-fabrik-ccd-ik-1-0-released.222685/");
		}

		// Token: 0x1700005B RID: 91
		// (get) Token: 0x060003FB RID: 1019 RVA: 0x0002E228 File Offset: 0x0002C428
		public bool inInteraction
		{
			get
			{
				if (!this.IsValid(true))
				{
					return false;
				}
				for (int i = 0; i < this.interactionEffectors.Length; i++)
				{
					if (this.interactionEffectors[i].inInteraction && !this.interactionEffectors[i].isPaused)
					{
						return true;
					}
				}
				return false;
			}
		}

		// Token: 0x060003FC RID: 1020 RVA: 0x0002E284 File Offset: 0x0002C484
		public bool IsInInteraction(FullBodyBipedEffector effectorType)
		{
			if (!this.IsValid(true))
			{
				return false;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				if (this.interactionEffectors[i].effectorType == effectorType)
				{
					return this.interactionEffectors[i].inInteraction && !this.interactionEffectors[i].isPaused;
				}
			}
			return false;
		}

		// Token: 0x060003FD RID: 1021 RVA: 0x0002E2F4 File Offset: 0x0002C4F4
		public bool IsPaused(FullBodyBipedEffector effectorType)
		{
			if (!this.IsValid(true))
			{
				return false;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				if (this.interactionEffectors[i].effectorType == effectorType)
				{
					return this.interactionEffectors[i].inInteraction && this.interactionEffectors[i].isPaused;
				}
			}
			return false;
		}

		// Token: 0x060003FE RID: 1022 RVA: 0x0002E360 File Offset: 0x0002C560
		public bool IsPaused()
		{
			if (!this.IsValid(true))
			{
				return false;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				if (this.interactionEffectors[i].inInteraction && this.interactionEffectors[i].isPaused)
				{
					return true;
				}
			}
			return false;
		}

		// Token: 0x060003FF RID: 1023 RVA: 0x0002E3BC File Offset: 0x0002C5BC
		public bool IsInSync()
		{
			if (!this.IsValid(true))
			{
				return false;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				if (this.interactionEffectors[i].isPaused)
				{
					for (int j = 0; j < this.interactionEffectors.Length; j++)
					{
						if (j != i && this.interactionEffectors[j].inInteraction && !this.interactionEffectors[j].isPaused)
						{
							return false;
						}
					}
				}
			}
			return true;
		}

		// Token: 0x06000400 RID: 1024 RVA: 0x0002E44C File Offset: 0x0002C64C
		public bool StartInteraction(FullBodyBipedEffector effectorType, InteractionObject interactionObject, bool interrupt)
		{
			if (!this.IsValid(true))
			{
				return false;
			}
			if (interactionObject == null)
			{
				return false;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				if (this.interactionEffectors[i].effectorType == effectorType)
				{
					return this.interactionEffectors[i].Start(interactionObject, this.targetTag, this.fadeInTime, interrupt);
				}
			}
			return false;
		}

		// Token: 0x06000401 RID: 1025 RVA: 0x0002E4C0 File Offset: 0x0002C6C0
		public bool PauseInteraction(FullBodyBipedEffector effectorType)
		{
			if (!this.IsValid(true))
			{
				return false;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				if (this.interactionEffectors[i].effectorType == effectorType)
				{
					return this.interactionEffectors[i].Pause();
				}
			}
			return false;
		}

		// Token: 0x06000402 RID: 1026 RVA: 0x0002E518 File Offset: 0x0002C718
		public bool ResumeInteraction(FullBodyBipedEffector effectorType)
		{
			if (!this.IsValid(true))
			{
				return false;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				if (this.interactionEffectors[i].effectorType == effectorType)
				{
					return this.interactionEffectors[i].Resume();
				}
			}
			return false;
		}

		// Token: 0x06000403 RID: 1027 RVA: 0x0002E570 File Offset: 0x0002C770
		public bool StopInteraction(FullBodyBipedEffector effectorType)
		{
			if (!this.IsValid(true))
			{
				return false;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				if (this.interactionEffectors[i].effectorType == effectorType)
				{
					return this.interactionEffectors[i].Stop();
				}
			}
			return false;
		}

		// Token: 0x06000404 RID: 1028 RVA: 0x0002E5C8 File Offset: 0x0002C7C8
		public void PauseAll()
		{
			if (!this.IsValid(true))
			{
				return;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				this.interactionEffectors[i].Pause();
			}
		}

		// Token: 0x06000405 RID: 1029 RVA: 0x0002E60C File Offset: 0x0002C80C
		public void ResumeAll()
		{
			if (!this.IsValid(true))
			{
				return;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				this.interactionEffectors[i].Resume();
			}
		}

		// Token: 0x06000406 RID: 1030 RVA: 0x0002E650 File Offset: 0x0002C850
		public void StopAll()
		{
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				this.interactionEffectors[i].Stop();
			}
		}

		// Token: 0x06000407 RID: 1031 RVA: 0x0002E684 File Offset: 0x0002C884
		public InteractionObject GetInteractionObject(FullBodyBipedEffector effectorType)
		{
			if (!this.IsValid(true))
			{
				return null;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				if (this.interactionEffectors[i].effectorType == effectorType)
				{
					return this.interactionEffectors[i].interactionObject;
				}
			}
			return null;
		}

		// Token: 0x06000408 RID: 1032 RVA: 0x0002E6DC File Offset: 0x0002C8DC
		public float GetProgress(FullBodyBipedEffector effectorType)
		{
			if (!this.IsValid(true))
			{
				return 0f;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				if (this.interactionEffectors[i].effectorType == effectorType)
				{
					return this.interactionEffectors[i].progress;
				}
			}
			return 0f;
		}

		// Token: 0x06000409 RID: 1033 RVA: 0x0002E73C File Offset: 0x0002C93C
		public float GetMinActiveProgress()
		{
			if (!this.IsValid(true))
			{
				return 0f;
			}
			float num = 1f;
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				if (this.interactionEffectors[i].inInteraction)
				{
					float progress = this.interactionEffectors[i].progress;
					if (progress > 0f && progress < num)
					{
						num = progress;
					}
				}
			}
			return num;
		}

		// Token: 0x0600040A RID: 1034 RVA: 0x0002E7B0 File Offset: 0x0002C9B0
		public bool TriggerInteraction(int index, bool interrupt)
		{
			if (!this.IsValid(true))
			{
				return false;
			}
			if (!this.TriggerIndexIsValid(index))
			{
				return false;
			}
			bool result = true;
			InteractionTrigger.Range range = this.triggersInRange[index].ranges[this.bestRangeIndexes[index]];
			for (int i = 0; i < range.interactions.Length; i++)
			{
				for (int j = 0; j < range.interactions[i].effectors.Length; j++)
				{
					if (!this.StartInteraction(range.interactions[i].effectors[j], range.interactions[i].interactionObject, interrupt))
					{
						result = false;
					}
				}
			}
			return result;
		}

		// Token: 0x0600040B RID: 1035 RVA: 0x0002E864 File Offset: 0x0002CA64
		public bool TriggerEffectorsReady(int index)
		{
			if (!this.IsValid(true))
			{
				return false;
			}
			if (!this.TriggerIndexIsValid(index))
			{
				return false;
			}
			for (int i = 0; i < this.triggersInRange[index].ranges.Length; i++)
			{
				InteractionTrigger.Range range = this.triggersInRange[index].ranges[i];
				for (int j = 0; j < range.interactions.Length; j++)
				{
					for (int k = 0; k < range.interactions[j].effectors.Length; k++)
					{
						if (this.IsInInteraction(range.interactions[j].effectors[k]))
						{
							return false;
						}
					}
				}
				for (int l = 0; l < range.interactions.Length; l++)
				{
					for (int m = 0; m < range.interactions[l].effectors.Length; m++)
					{
						if (this.IsPaused(range.interactions[l].effectors[m]))
						{
							for (int n = 0; n < range.interactions[l].effectors.Length; n++)
							{
								if (n != m && !this.IsPaused(range.interactions[l].effectors[n]))
								{
									return false;
								}
							}
						}
					}
				}
			}
			return true;
		}

		// Token: 0x0600040C RID: 1036 RVA: 0x0002E9C8 File Offset: 0x0002CBC8
		public InteractionTrigger.Range GetTriggerRange(int index)
		{
			if (!this.IsValid(true))
			{
				return null;
			}
			if (index < 0 || index >= this.bestRangeIndexes.Count)
			{
				Warning.Log("Index out of range.", base.transform, false);
				return null;
			}
			return this.triggersInRange[index].ranges[this.bestRangeIndexes[index]];
		}

		// Token: 0x0600040D RID: 1037 RVA: 0x0002EA2C File Offset: 0x0002CC2C
		public int GetClosestTriggerIndex()
		{
			if (!this.IsValid(true))
			{
				return -1;
			}
			if (this.triggersInRange.Count == 0)
			{
				return -1;
			}
			if (this.triggersInRange.Count == 1)
			{
				return 0;
			}
			int result = -1;
			float num = float.PositiveInfinity;
			for (int i = 0; i < this.triggersInRange.Count; i++)
			{
				if (this.triggersInRange[i] != null)
				{
					float num2 = Vector3.SqrMagnitude(this.triggersInRange[i].transform.position - base.transform.position);
					if (num2 < num)
					{
						result = i;
						num = num2;
					}
				}
			}
			return result;
		}

		// Token: 0x1700005C RID: 92
		// (get) Token: 0x0600040E RID: 1038 RVA: 0x00004A11 File Offset: 0x00002C11
		public FullBodyBipedIK ik
		{
			get
			{
				return this.fullBody;
			}
		}

		// Token: 0x1700005D RID: 93
		// (get) Token: 0x0600040F RID: 1039 RVA: 0x00004A19 File Offset: 0x00002C19
		// (set) Token: 0x06000410 RID: 1040 RVA: 0x00004A21 File Offset: 0x00002C21
		public List<InteractionTrigger> triggersInRange { get; set; }

		// Token: 0x06000411 RID: 1041 RVA: 0x0002EAE0 File Offset: 0x0002CCE0
		public virtual void Start()
		{
			if (this.fullBody == null)
			{
				this.fullBody = base.GetComponent<FullBodyBipedIK>();
			}
			if (this.fullBody == null)
			{
				Warning.Log("InteractionSystem can not find a FullBodyBipedIK component", base.transform, false);
				return;
			}
			IKSolverFullBodyBiped solver = this.fullBody.solver;
			solver.OnPreUpdate = (IKSolver.UpdateDelegate)Delegate.Combine(solver.OnPreUpdate, new IKSolver.UpdateDelegate(this.OnPreFBBIK));
			IKSolverFullBodyBiped solver2 = this.fullBody.solver;
			solver2.OnPostUpdate = (IKSolver.UpdateDelegate)Delegate.Combine(solver2.OnPostUpdate, new IKSolver.UpdateDelegate(this.OnPostFBBIK));
			this.OnInteractionStart = (InteractionSystem.InteractionDelegate)Delegate.Combine(this.OnInteractionStart, new InteractionSystem.InteractionDelegate(this.LookAtInteraction));
			this.OnInteractionPause = (InteractionSystem.InteractionDelegate)Delegate.Combine(this.OnInteractionPause, new InteractionSystem.InteractionDelegate(this.InteractionPause));
			this.OnInteractionResume = (InteractionSystem.InteractionDelegate)Delegate.Combine(this.OnInteractionResume, new InteractionSystem.InteractionDelegate(this.InteractionResume));
			this.OnInteractionStop = (InteractionSystem.InteractionDelegate)Delegate.Combine(this.OnInteractionStop, new InteractionSystem.InteractionDelegate(this.InteractionStop));
			foreach (InteractionEffector interactionEffector in this.interactionEffectors)
			{
				interactionEffector.Initiate(this, this.fullBody.solver);
			}
			this.triggersInRange = new List<InteractionTrigger>();
			this.c = base.GetComponent<Collider>();
			this.UpdateTriggerEventBroadcasting();
			this.initiated = true;
		}

		// Token: 0x06000412 RID: 1042 RVA: 0x00004A2A File Offset: 0x00002C2A
		public void InteractionPause(FullBodyBipedEffector effector, InteractionObject interactionObject)
		{
			this.lookAt.isPaused = true;
		}

		// Token: 0x06000413 RID: 1043 RVA: 0x00004A38 File Offset: 0x00002C38
		public void InteractionResume(FullBodyBipedEffector effector, InteractionObject interactionObject)
		{
			this.lookAt.isPaused = false;
		}

		// Token: 0x06000414 RID: 1044 RVA: 0x00004A38 File Offset: 0x00002C38
		public void InteractionStop(FullBodyBipedEffector effector, InteractionObject interactionObject)
		{
			this.lookAt.isPaused = false;
		}

		// Token: 0x06000415 RID: 1045 RVA: 0x00004A46 File Offset: 0x00002C46
		public void LookAtInteraction(FullBodyBipedEffector effector, InteractionObject interactionObject)
		{
			this.lookAt.Look(interactionObject.lookAtTarget, Time.time + interactionObject.length * 0.5f);
		}

		// Token: 0x06000416 RID: 1046 RVA: 0x0002EC64 File Offset: 0x0002CE64
		public void OnTriggerEnter(Collider c)
		{
			if (this.fullBody == null)
			{
				return;
			}
			InteractionTrigger component = c.GetComponent<InteractionTrigger>();
			if (this.inContact.Contains(component))
			{
				return;
			}
			this.inContact.Add(component);
		}

		// Token: 0x06000417 RID: 1047 RVA: 0x0002ECA8 File Offset: 0x0002CEA8
		public void OnTriggerExit(Collider c)
		{
			if (this.fullBody == null)
			{
				return;
			}
			InteractionTrigger component = c.GetComponent<InteractionTrigger>();
			this.inContact.Remove(component);
		}

		// Token: 0x06000418 RID: 1048 RVA: 0x0002ECDC File Offset: 0x0002CEDC
		public bool ContactIsInRange(int index, out int bestRangeIndex)
		{
			bestRangeIndex = -1;
			if (!this.IsValid(true))
			{
				return false;
			}
			if (index < 0 || index >= this.inContact.Count)
			{
				Warning.Log("Index out of range.", base.transform, false);
				return false;
			}
			if (this.inContact[index] == null)
			{
				Warning.Log("The InteractionTrigger in the list 'inContact' has been destroyed", base.transform, false);
				return false;
			}
			bestRangeIndex = this.inContact[index].GetBestRangeIndex(base.transform, this.GetComponent<Camera>().transform, this.raycastHit);
			return bestRangeIndex != -1;
		}

		// Token: 0x06000419 RID: 1049 RVA: 0x0002ED80 File Offset: 0x0002CF80
		public void OnDrawGizmosSelected()
		{
			if (Application.isPlaying)
			{
				return;
			}
			if (this.fullBody == null)
			{
				this.fullBody = base.GetComponent<FullBodyBipedIK>();
			}
			if (this.GetComponent<Collider>() == null)
			{
				//this.GetComponent<Collider>() = base.GetComponent<Collider>();
			}
		}

		// Token: 0x0600041A RID: 1050 RVA: 0x0002EDD4 File Offset: 0x0002CFD4
		public void Update()
		{
			if (this.fullBody == null)
			{
				return;
			}
			this.UpdateTriggerEventBroadcasting();
			this.Raycasting();
			this.triggersInRange.Clear();
			this.bestRangeIndexes.Clear();
			for (int i = 0; i < this.inContact.Count; i++)
			{
				int item = -1;
				if (this.inContact[i] != null && this.ContactIsInRange(i, out item))
				{
					this.triggersInRange.Add(this.inContact[i]);
					this.bestRangeIndexes.Add(item);
				}
			}
			this.lookAt.Update();
		}

		// Token: 0x0600041B RID: 1051 RVA: 0x0002EE88 File Offset: 0x0002D088
		public void Raycasting()
		{
			if (this.camRaycastLayers == -1)
			{
				return;
			}
			if (this.GetComponent<Camera>() == null)
			{
				return;
			}
			//Physics.Raycast(this.GetComponent<Camera>().position, this.GetComponent<Camera>().forward, out this.raycastHit, this.camRaycastDistance, this.camRaycastLayers);
		}

		// Token: 0x0600041C RID: 1052 RVA: 0x0002EEEC File Offset: 0x0002D0EC
		public void UpdateTriggerEventBroadcasting()
		{
			if (this.GetComponent<Collider>() == null)
			{
				//this.GetComponent<Collider>() = this.c;
			}
			if (this.GetComponent<Collider>() != null && this.GetComponent<Collider>() != this.c)
			{
				if (this.GetComponent<Collider>().GetComponent<TriggerEventBroadcaster>() == null)
				{
					TriggerEventBroadcaster triggerEventBroadcaster = this.GetComponent<Collider>().gameObject.AddComponent<TriggerEventBroadcaster>();
					triggerEventBroadcaster.target = base.gameObject;
				}
				if (this.lastCollider != null && this.lastCollider != this.c && this.lastCollider != this.GetComponent<Collider>())
				{
					TriggerEventBroadcaster component = this.lastCollider.GetComponent<TriggerEventBroadcaster>();
					if (component != null)
					{
						UnityEngine.Object.Destroy(component);
					}
				}
			}
			this.lastCollider = this.GetComponent<Collider>();
		}

		// Token: 0x0600041D RID: 1053 RVA: 0x0002EFD8 File Offset: 0x0002D1D8
		public void LateUpdate()
		{
			if (this.fullBody == null)
			{
				return;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				this.interactionEffectors[i].Update(base.transform, this.fullBody.solver, this.speed);
			}
			for (int j = 0; j < this.interactionEffectors.Length; j++)
			{
				this.interactionEffectors[j].ResetToDefaults(this.fullBody.solver, this.resetToDefaultsSpeed * this.speed);
			}
		}

		// Token: 0x0600041E RID: 1054 RVA: 0x00004A6B File Offset: 0x00002C6B
		public void OnPreFBBIK()
		{
			if (!base.enabled)
			{
				return;
			}
			if (this.fullBody == null)
			{
				return;
			}
			this.lookAt.SolveSpine();
		}

		// Token: 0x0600041F RID: 1055 RVA: 0x0002F074 File Offset: 0x0002D274
		public void OnPostFBBIK()
		{
			if (!base.enabled)
			{
				return;
			}
			if (this.fullBody == null)
			{
				return;
			}
			for (int i = 0; i < this.interactionEffectors.Length; i++)
			{
				this.interactionEffectors[i].OnPostFBBIK(this.fullBody.solver);
			}
			this.lookAt.SolveHead();
		}

		// Token: 0x06000420 RID: 1056 RVA: 0x0002F0DC File Offset: 0x0002D2DC
		public void OnDestroy()
		{
			if (this.fullBody == null)
			{
				return;
			}
			IKSolverFullBodyBiped solver = this.fullBody.solver;
			solver.OnPreUpdate = (IKSolver.UpdateDelegate)Delegate.Remove(solver.OnPreUpdate, new IKSolver.UpdateDelegate(this.OnPreFBBIK));
			IKSolverFullBodyBiped solver2 = this.fullBody.solver;
			solver2.OnPostUpdate = (IKSolver.UpdateDelegate)Delegate.Remove(solver2.OnPostUpdate, new IKSolver.UpdateDelegate(this.OnPostFBBIK));
			this.OnInteractionStart = (InteractionSystem.InteractionDelegate)Delegate.Remove(this.OnInteractionStart, new InteractionSystem.InteractionDelegate(this.LookAtInteraction));
			this.OnInteractionPause = (InteractionSystem.InteractionDelegate)Delegate.Remove(this.OnInteractionPause, new InteractionSystem.InteractionDelegate(this.InteractionPause));
			this.OnInteractionResume = (InteractionSystem.InteractionDelegate)Delegate.Remove(this.OnInteractionResume, new InteractionSystem.InteractionDelegate(this.InteractionResume));
			this.OnInteractionStop = (InteractionSystem.InteractionDelegate)Delegate.Remove(this.OnInteractionStop, new InteractionSystem.InteractionDelegate(this.InteractionStop));
		}

		// Token: 0x06000421 RID: 1057 RVA: 0x0002F1DC File Offset: 0x0002D3DC
		public bool IsValid(bool log)
		{
			if (this.fullBody == null)
			{
				if (log)
				{
					Warning.Log("FBBIK is null. Will not update the InteractionSystem", base.transform, false);
				}
				return false;
			}
			if (!this.initiated)
			{
				if (log)
				{
					Warning.Log("The InteractionSystem has not been initiated yet.", base.transform, false);
				}
				return false;
			}
			return true;
		}

		// Token: 0x06000422 RID: 1058 RVA: 0x0002F238 File Offset: 0x0002D438
		public bool TriggerIndexIsValid(int index)
		{
			if (index < 0 || index >= this.triggersInRange.Count)
			{
				Warning.Log("Index out of range.", base.transform, false);
				return false;
			}
			if (this.triggersInRange[index] == null)
			{
				Warning.Log("The InteractionTrigger in the list 'inContact' has been destroyed", base.transform, false);
				return false;
			}
			return true;
		}

		// Token: 0x06000423 RID: 1059 RVA: 0x000049B5 File Offset: 0x00002BB5
		[ContextMenu("User Manual")]
		public void OpenUserManual()
		{
			Application.OpenURL("http://www.root-motion.com/finalikdox/html/page10.html");
		}

		// Token: 0x06000424 RID: 1060 RVA: 0x00004A96 File Offset: 0x00002C96
		[ContextMenu("Scrpt Reference")]
		public void OpenScriptReference()
		{
			Application.OpenURL("http://www.root-motion.com/finalikdox/html/class_root_motion_1_1_final_i_k_1_1_interaction_system.html");
		}

		// Token: 0x040002B1 RID: 689
		[Tooltip("If not empty, only the targets with the specified tag will be used by this Interaction System.")]
		public string targetTag = string.Empty;

		// Token: 0x040002B2 RID: 690
		[Tooltip("The fade in time of the interaction.")]
		public float fadeInTime = 0.3f;

		// Token: 0x040002B3 RID: 691
		[Tooltip("The master speed for all interactions.")]
		public float speed = 1f;

		// Token: 0x040002B4 RID: 692
		[Tooltip("If > 0, lerps all the FBBIK channels used by the Interaction System back to their default or initial values when not in interaction.")]
		public float resetToDefaultsSpeed = 1f;

		// Token: 0x040002B7 RID: 695
		[Tooltip("The layers that will be raycasted from the camera (along camera.forward). All InteractionTrigger look at target colliders should be included.")]
		public LayerMask camRaycastLayers;

		// Token: 0x040002B8 RID: 696
		[Tooltip("Max distance of raycasting from the camera.")]
		public float camRaycastDistance = 1f;

		// Token: 0x040002B9 RID: 697
		public List<InteractionTrigger> inContact = new List<InteractionTrigger>();

		// Token: 0x040002BA RID: 698
		public List<int> bestRangeIndexes = new List<int>();

		// Token: 0x040002BB RID: 699
		public InteractionSystem.InteractionDelegate OnInteractionStart;

		// Token: 0x040002BC RID: 700
		public InteractionSystem.InteractionDelegate OnInteractionPause;

		// Token: 0x040002BD RID: 701
		public InteractionSystem.InteractionDelegate OnInteractionPickUp;

		// Token: 0x040002BE RID: 702
		public InteractionSystem.InteractionDelegate OnInteractionResume;

		// Token: 0x040002BF RID: 703
		public InteractionSystem.InteractionDelegate OnInteractionStop;

		// Token: 0x040002C0 RID: 704
		public InteractionSystem.InteractionEventDelegate OnInteractionEvent;

		// Token: 0x040002C1 RID: 705
		public RaycastHit raycastHit;

		// Token: 0x040002C2 RID: 706
		[Tooltip("Reference to the FBBIK component.")]
		[Space(10f)]
		[SerializeField]
		public FullBodyBipedIK fullBody;

		// Token: 0x040002C3 RID: 707
		[Tooltip("Handles looking at the interactions.")]
		public InteractionLookAt lookAt = new InteractionLookAt();

		// Token: 0x040002C4 RID: 708
		public InteractionEffector[] interactionEffectors = new InteractionEffector[]
		{
			new InteractionEffector(FullBodyBipedEffector.Body),
			new InteractionEffector(FullBodyBipedEffector.LeftFoot),
			new InteractionEffector(FullBodyBipedEffector.LeftHand),
			new InteractionEffector(FullBodyBipedEffector.LeftShoulder),
			new InteractionEffector(FullBodyBipedEffector.LeftThigh),
			new InteractionEffector(FullBodyBipedEffector.RightFoot),
			new InteractionEffector(FullBodyBipedEffector.RightHand),
			new InteractionEffector(FullBodyBipedEffector.RightShoulder),
			new InteractionEffector(FullBodyBipedEffector.RightThigh)
		};

		// Token: 0x040002C5 RID: 709
		public bool initiated;

		// Token: 0x040002C6 RID: 710
		public Collider lastCollider;

		// Token: 0x040002C7 RID: 711
		public Collider c;

		// Token: 0x0200005C RID: 92
		// (Invoke) Token: 0x06000426 RID: 1062
		public delegate void InteractionDelegate(FullBodyBipedEffector effectorType, InteractionObject interactionObject);

		// Token: 0x0200005D RID: 93
		// (Invoke) Token: 0x0600042A RID: 1066
		public delegate void InteractionEventDelegate(FullBodyBipedEffector effectorType, InteractionObject interactionObject, InteractionObject.InteractionEvent interactionEvent);
	}
}
